package com.ckzp.core.util;

import java.text.DecimalFormat;

/**
 * Created by 51594 on 2022/7/27.
 */
public class DoubleUtil {

    /**
     * @param number 需要保留两位的数
     * @return
     */
    public static double saveTwoFormat(double number) {
        DecimalFormat decimalFormat = new DecimalFormat("#.00");
        return Double.valueOf(decimalFormat.format(number));
    }
}
